import React, { Component } from 'react'
import { View} from '@tarojs/components'
import './index.scss'
import ListView from "taro-listview";


export default class Index extends Component {
  state = {
    list:[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},]
  }


  componentWillReceiveProps (nextProps) {
    console.log(this.props, nextProps)
  }

  componentWillUnmount () { }

  componentDidShow () { }

  componentDidHide () { }

  render () {
    const {list} = this.state
    return (
      <View className='layout'>
      <ListView
      lazy
      isLoaded={true}
      hasMore={true}
      style={{ height: "500px" }}
    >
      {
        list.map((item, index) => {
        return (
          <View className='item' key={index}>
            <View className="title">{index}</View>
          </View>
        );
      })
    }
    </ListView>
      </View>
    )
  }
}



